package com.dhcc.wb.task;

import java.util.Date;
import java.util.TimerTask;

import com.dhcc.wb.articleday.ArticleTask;
import com.dhcc.wb.articleliushui.ArticleLiushuiTask;
import com.dhcc.wb.user.UserTask;
import com.dhcc.wb.util.DateUtil;
import com.dhcc.wb.util.TokenUtil;

public class NFDFlightTimerTask extends TimerTask {
	@Override
	public void run() {
		 try {
			 System.out.println("========定时任务开始11=======");
			 
			 String begin_data = DateUtil.addDay(new Date(), -1);
			 String end_data = DateUtil.addDay(new Date(), -1);
			 
             //初始化执行一次
			 TokenUtil.chushihua();
			 //用户每天早上8点5分更新
			 UserTask.updateUser(begin_data,end_data);
			 //文章每天早上8点5分更新
			 ArticleTask.updateArticle(begin_data,end_data);
			 ArticleLiushuiTask.updateArticle(begin_data, end_data);
			 
			 
			
			 System.out.println("==========定时任务完成===========");
			}catch (Exception e) {
				e.printStackTrace();
				System.out.println("-------------解析信息发生异常--------------");
			}
	}
	
	
	

	
	
	
	
	
	
	
	
	
}
